import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Welfare from '@/components/Welfare'
import Recipe from '@/components/Recipe'
import Recommend from '@/components/Recommend'
import Fashion from '@/components/Fashion'
import Life from '@/components/Life'
import Shop from '@/components/Shop'
import My from '@/components/My'
import Form from '@/components/Form'
import Login from '@/components/Login'
import Register from '@/components/Register'
import Details from '@/components/Details'
import Goods from '@/components/Goods'
import Accounts from '@/components/Accounts'
import test from '@/components/test'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/welfare',
      name: 'welfare',
      component:Welfare
    },
    {
      path: '/recipe',
      name: 'recipe',
      component:Recipe
    },
    {
      path: '/recommend',
      name: 'recommend',
      component:Recommend
    },
    {
      path: '/fashion',
      name: 'fashion',
      component:Fashion
    },
    {
      path: '/life',
      name: 'life',
      component:Life
    },
    {
      path: '/shop',
      name: 'shop',
      component:Shop
    },
    {
      path: '/my/:user_id',
      props:true,
      name: 'my',
      component:My
    },
    {
      path: '/form',
      name: 'form',
      component:Form
    },
    {
      path: '/login',
      name: 'login',
      component:Login
    },
    {
      path: '/register',
      name: 'register',
      component:Register
    },
    {
      path: '/details/:shop_id',
      name: 'details',
      component:Details,
      props:true
    },
    {
      path: '/goods/:shop_id/:title/:goods_id',
      name: 'goods',
      component:Goods,
      props:true
    },
    {
      path: '/test',
      name: 'test',
      component:test
    },
    {
      path: '/accounts/:shop_id',
      name: 'accounts',
      component:Accounts,
      props:true
    },
  ]
})
